package org.example.springbook.controller;

import org.example.springbook.BookInfo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RequestMapping("/book")
@RestController
public class BookController {
    @RequestMapping("getList")
    public List<BookInfo> getList(){
//        没有数据，采用mook的方式
        List<BookInfo> bookInfos = new ArrayList<>();
//        bookInfos = mockData();
        return bookInfos;
    }

//    private List<BookInfo> mockData(){
//        return ;
//    }
}
